package com.cmc.cloud.cmclink.doc.vo.bookingrequestconfigvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

/**
 * 装船要求用箱要求订舱要求选项配置 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BookingRequestConfigBaseVO {

    @Schema(description = "要求类型代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{BookingRequestConfigBaseVO.requestTypeCode.NotBlank}")
    @Length(max = 20, message = "{BookingRequestConfigBaseVO.requestTypeCode.Length}")
    private String requestTypeCode;

    @Schema(description = "要求代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{BookingRequestConfigBaseVO.requestCode.NotBlank}")
    @Length(max = 30, message = "{BookingRequestConfigBaseVO.requestCode.Length}")
    private String requestCode;

    @Schema(description = "要求英文描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{BookingRequestConfigBaseVO.requestDescEn.NotBlank}")
    @Length(max = 100, message = "{BookingRequestConfigBaseVO.requestDescEn.Length}")
    private String requestDescEn;

    @Schema(description = "要求中文描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{BookingRequestConfigBaseVO.requestDescCn.NotBlank}")
    @Length(max = 100, message = "{BookingRequestConfigBaseVO.requestDescCn.Length}")
    private String requestDescCn;

    @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BookingRequestConfigBaseVO.sortNo.NotNull}")
    @Pattern(regexp = "^\\d{1,5}$", message = "必须由1到5位阿拉伯数字组成")
    private String sortNo;

    @Schema(description = "禁启用状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BookingRequestConfigBaseVO.enable.NotNull}")
    private Boolean enable;


}
